package com.levenx.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 *
 * @author 孙乐进
 * @date 2019/2/25
 */
@ConfigurationProperties("lvx.security")
@Component
public class SecurityProperties {

    private int rememberMeSeconds = 3600;

    private LoginResponseType loginType = LoginResponseType.JSON;

    private PageProperties page = new PageProperties();

    private UrlProperties url = new UrlProperties();

    private ValidateCodeProperties code = new ValidateCodeProperties();


    public int getRememberMeSeconds() {
        return rememberMeSeconds;
    }

    public void setRememberMeSeconds(int rememberMeSeconds) {
        this.rememberMeSeconds = rememberMeSeconds;
    }

    public LoginResponseType getLoginType() {
        return loginType;
    }

    public void setLoginType(LoginResponseType loginType) {
        this.loginType = loginType;
    }

    public PageProperties getPage() {
        return page;
    }

    public void setPage(PageProperties page) {
        this.page = page;
    }

    public UrlProperties getUrl() {
        return url;
    }

    public void setUrl(UrlProperties url) {
        this.url = url;
    }

    public ValidateCodeProperties getCode() {
        return code;
    }

    public void setCode(ValidateCodeProperties code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return "SecurityProperties{" +
                "rememberMeSeconds=" + rememberMeSeconds +
                ", loginType=" + loginType +
                ", page=" + page +
                ", url=" + url +
                ", code=" + code +
                '}';
    }
}
